package cn.ztydata.teachingsystem.heaven.web.dto;

import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.sql.Date;

/**
 * 笔记Dto
 * Created by wyh on 2015/3/18.
 */
public class NoteDto {

    private Long id; //笔记ID
    private Long userId; //用户ID
    private Integer roleId; //角色ID 0老师 1学生
    private String userName; //姓名
    private String userPhoto; //头像
    private Date date; //创建时间 yyyy-MM-dd

    private Integer best; //是否收藏 0否 1收藏
    private String lessonName; //课程名称
    private String chapter; //章名称
    private String node; //节名称

    @NotEmpty
    @Size(max = 300, message = "内容不合法")
    private String content; //内容

    @NotNull
    @Range(min = 0, max = 1, message = "公开不合法")
    private Integer isOpen; //是否公开 0不公开 1公开

    @NotNull
    @Min(value = 1, message = "课程ID不合法")
    private Long lessonId; //课程ID

    @NotNull
    @Min(value = 0, message = "群组ID不合法")
    private Long groupId; //群组ID

    @NotNull
    @Min(value = 0, message = "章ID不合法")
    private Long chapterId; //章ID

    @NotNull
    @Min(value = 0, message = "节ID不合法")
    private Long nodeId; //节ID


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPhoto() {
        return userPhoto;
    }

    public void setUserPhoto(String userPhoto) {
        this.userPhoto = userPhoto;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getIsOpen() {
        return isOpen;
    }

    public void setIsOpen(Integer isOpen) {
        this.isOpen = isOpen;
    }

    public Integer getBest() {
        return best;
    }

    public void setBest(Integer best) {
        this.best = best;
    }

    public String getLessonName() {
        return lessonName;
    }

    public void setLessonName(String lessonName) {
        this.lessonName = lessonName;
    }

    public String getChapter() {
        return chapter;
    }

    public void setChapter(String chapter) {
        this.chapter = chapter;
    }

    public String getNode() {
        return node;
    }

    public void setNode(String node) {
        this.node = node;
    }

    public Long getLessonId() {
        return lessonId;
    }

    public void setLessonId(Long lessonId) {
        this.lessonId = lessonId;
    }

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public Long getChapterId() {
        return chapterId;
    }

    public void setChapterId(Long chapterId) {
        this.chapterId = chapterId;
    }

    public Long getNodeId() {
        return nodeId;
    }

    public void setNodeId(Long nodeId) {
        this.nodeId = nodeId;
    }
}
